﻿using AutoMapper;
using DataServer.ApplicationLib.Entities;
using DataServer.CommonLib.Models.DataBase;

namespace Config.WebApi.Mappers
{
    public class DatabaseProfile : Profile
    {
        public DatabaseProfile()
        {
            CreateMap<DatabaseEditRequestDto, DataBaseEntity>();

            CreateMap<DataBaseEntity, DatabaseInfoResponseDto>()
                .ForMember(desc => desc.Key, opt => opt.MapFrom(src => src.Id));
        }
    }
}